﻿

using System.Collections;
using CSharpPro._11月3日作业.service.impl;


namespace CSharpPro._11月3日作业;

public class Demo11
{
    public void TestPrint()
    {
        Dictionary<string,User> users = new Dictionary<string, User>();
        Console.WriteLine("1.登录 2.注册");
        int p = Console.Read();
        if (p == 1)
        {
            Console.WriteLine("请输入账号");
            string name = Console.ReadLine();
            Console.WriteLine("请输入密码");
            string password = Console.ReadLine();
            
            UserServiceImpl.login(users, new User(name, password));
        }
        else if (p == 2)
        {
            
            User us=UserServiceImpl.rigite();
            users[us.Username] = us;
            
        }

    }
}